using MiddlewarePlugins;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Primitives;
using Microsoft.OpenApi.Models;
using NetCore6WebAPITestOneEntity;
using NetCroe6WebAPITestOne.Controllers;
using NetCroe6WebAPITestOneBusiness;
using NetCroe6WebAPITestOneResponse;
using Org.BouncyCastle.Crypto.Tls;
using SqlSugar;
using System.Reflection;
using System.Xml.Serialization;
using Microsoft.AspNetCore.Mvc.Filters;
using ActionFilterPlugin;
using NetCore6WebAPITestOneRequestEntity;
using MySqlX.XDevAPI;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
using System.Text;
using CommonLibary;

var builder = WebApplication.CreateBuilder(args);

builder.InitBuilder();

// Add services to the container.
builder.Services.AddControllers();

// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();

#region k
//builder.WebHost.UseUrls("http://localhost:8080");

//// Add services to the container.
//builder.Services.AddControllersWithViews();
#endregion

WebApplication app = builder.Build();

app.InitApp();

app.UseHttpsRedirection();

app.MapControllers();
app.UseCors();

app.Run();